/*
 * @Descripttion:
 * @version:
 * @Author: ada.wu
 * @Date: 2023-10-29 22:56:40
 * @LastEditors: ada.wu
 * @LastEditTime: 2023-12-06 23:57:30
 */
/*
 * @Descripttion:
 * @version:
 * @Author: ada.wu
 * @Date: 2023-06-16 16:49:02
 * @LastEditors: ada.wu
 * @LastEditTime: 2023-10-31 12:52:26
 */
/**
 * mockjs
 * @see: http://mockjs.com/examples.html
 * ThinkPHP 资源控制器: index, read, save, update, delete
 * Laravel 资源控制器: index, show, store, update, destory
 */
import Mock from 'mockjs'
import IndexMock from './modules/IndexMock'
import LoginMock from './modules/LoginMock'
import UserMock from './modules/UserMock'
import RolesMock from './modules/RolesMock'
import MenusMock from './modules/MenusMock'
import ClassroomMock from './modules/ClassroomMock'
import TeachingLiknageMock from './modules/TeachingLiknageMock'
import EquipmentMock from './modules/EquipmentMock'
import FloorMock from './modules/FloorMock'
import OperationMock from './modules/OperationMock'
import SystemMock from './modules/SystemMock'


Mock.setup({
    timeout: '200-600'
})

Mock.mock("/test", (option) => {
    console.log(option);
    return 'ok';
})
// 登录模块
Mock.mock("/admin/login/login", 'post', (option) => { return LoginMock.login(option) })
Mock.mock("/admin/index/main", (option) => { return IndexMock.getMainData(option) })

// 用户菜单
// Mock.mock("/resource/usermenu", (option) => { return IndexMock.getMenus(option) })

// 管理员用户管理
// Mock.mock(RegExp('/backenduser/datagrid' + ".*"), option => UserMock.index(option))
// Mock.mock(RegExp('/backenduser/delete' + ".*"), option => UserMock.delete(option))


// 角色管理
// Mock.mock(RegExp('/role/datagrid' + ".*"), option => RolesMock.index(option))
// Mock.mock('/role/edit', 'post', option => RolesMock.save(option))
// Mock.mock('/role/allocate', 'post', option => RolesMock.update(option))
// Mock.mock(RegExp('/role/delete' + ".*"), 'post', option => RolesMock.delete(option))

// 菜单管理
// Mock.mock(RegExp('/resource/treegrid' + ".*"), option => MenusMock.index(option))
// Mock.mock('/resource/edit', 'post', option => MenusMock.update(option))



Mock.mock(RegExp('/admin/authMenu/option' + ".*"), option => MenusMock.option(option))
Mock.mock(RegExp('/admin/authMenu/read' + ".*"), option => MenusMock.read(option))
Mock.mock('/admin/authMenu/save', 'post', option => MenusMock.save(option))
Mock.mock(RegExp('/admin/authMenu/delete' + ".*"), 'delete', option => MenusMock.delete(option))



// 系统留言反馈


// Mock.mock(RegExp('/room/all' + ".*"), option => ClassroomMock.room(option))
// Mock.mock(RegExp('/room/data' + ".*"), option => ClassroomMock.datagrid(option))
// Mock.mock(RegExp('/room/list' + ".*"), option => ClassroomMock.list(option))
// Mock.mock(RegExp('/building/all' + ".*"), option => ClassroomMock.index(option))
// Mock.mock(RegExp('/room/fault' + ".*"), option => ClassroomMock.fault(option))
Mock.mock(RegExp('/room/busy' + ".*"), option => ClassroomMock.busy(option))

//学期管理
// Mock.mock(RegExp('/semesterConfig/info' + ".*"), option => TeachingLiknageMock.info(option))
// Mock.mock(RegExp('/timetableconfig/datagrid' + ".*"), option => TeachingLiknageMock.datagrid(option))
Mock.mock(RegExp('/timetable/datagrid' + ".*"), option => TeachingLiknageMock.index(option))
// Mock.mock(RegExp('/task/list' + ".*"), option => TeachingLiknageMock.task(option))
// Mock.mock(RegExp('/tasklog/list' + ".*"), option => TeachingLiknageMock.tasklog(option))

// Mock.mock(RegExp('/equipment/datagrid' + ".*"), option => EquipmentMock.index(option))
// Mock.mock(RegExp('/floor/buildingfloor' + ".*"), option => FloorMock.floor(option))


//运维管理
// Mock.mock(RegExp('/patrollog/datagrid' + ".*"), option => OperationMock.index(option))
// Mock.mock(RegExp('/workerorder/datagrid' + ".*"), option => OperationMock.worker(option))
// Mock.mock(RegExp('/log/control' + ".*"), option => OperationMock.control(option))
// Mock.mock(RegExp('/log/card' + ".*"), option => OperationMock.card(option))

//系统设置
// Mock.mock(RegExp('/building/datagrid' + ".*"), option => SystemMock.building(option))
// Mock.mock(RegExp('/floor/datagrid' + ".*"), option => SystemMock.floor(option))
// Mock.mock(RegExp('/room/datagrid' + ".*"), option => SystemMock.room(option))
// Mock.mock(RegExp('/iccard/datagrid' + ".*"), option => SystemMock.iccard(option))
// Mock.mock(RegExp('/smartlock/datagrid' + ".*"), option => SystemMock.smartlock(option))
// Mock.mock(RegExp('/smartlock/log' + ".*"), option => SystemMock.smartlockLog(option))
